<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich" 
	xmlns:s="http://sdm.msc.com/jsf" xmlns:sfw="http://www.mscsoftware.com">
	<h:head>
		<meta http-equiv="Content-Type" content="text/html;  charset=UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
		<f:view locale="#{prefs.locale}" />
		<title><h:outputText value="#{i18n.portal_title}" /></title>
		 
		<!--
        <link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon"/>	
        <link rel="icon" type="image/gif" href="../images/icon_16x16.gif" />
		-->
		
		<link rel="shortcut icon" href="https://www.nio.cn/ecs/prod/s3fs-public/1B_Symbol_Small-Scale_RGB_Black_Artwork_2.png?2z8lwPNgs.Eo.1ZDR2MGP7.fiaaPOvea" type="image/png" />
		
		<t:stylesheet path="/themes/#{prefs.theme}/openfaces.css" />
		<t:stylesheet path="/themes/#{prefs.theme}/richfaces.css" />
		<t:stylesheet path="/themes/#{prefs.theme}/wcomposite.css" />
		<t:stylesheet path="/themes/#{prefs.theme}/wprimary.css" />
		<t:stylesheet path="/themes/#{prefs.theme}/compareMaterial.css" />
		<t:stylesheet path="/themes/#{prefs.theme}/materialSOD.css" />
		<t:stylesheet path="/js/jquery/css/custom-theme/jquery-ui-1.11.3.custom.css" />
		<t:stylesheet path="/js/jquery/css/custom-theme/jquery-ui-timepicker-addon.css" />
		<t:stylesheet path="../../mod/jquery/jquery.contextMenu.css" />
		<t:stylesheet path="../../mod/mod.css" />
		<t:stylesheet path="../../sws/sws.css" />
		<t:stylesheet path="../../colorpicker/css/colpick.css" />
		<t:stylesheet path="../../home/hometab.css" />
		<t:stylesheet path="/themes/#{prefs.theme}/common.css" />
		<t:stylesheet path="../../tree/tree.css" />
		<t:stylesheet path="../../mod/jquery/slimbox1/css/slimbox2.css" />
		<t:stylesheet path="/themes/#{prefs.theme}/wcomposite.css" />		
		<t:stylesheet path="/themes/#{prefs.theme}/clienttree.css" />
		<!--  <t:stylesheet path="/themes/#{prefs.theme}/#{prefs.language}/local.css"/>  -->
		<t:stylesheet path="../../searchtemplate/search.css" />
		<t:stylesheet path="/js/highlight/highlight.css" /> 
        <link rel="stylesheet" href="../../tree/jquery.treetable.css" />
        <link rel="stylesheet" href="../../tree/jquery.treetable.theme.default.css" />
        <t:stylesheet path="../../sod/sod.css" />
		<t:stylesheet path="/themes/#{prefs.theme}/portal.css" />
		<t:stylesheet path="/themes/#{prefs.theme}/custom.css" />
		
		<script type="text/javascript" src="../../js/jquery/js/jquery-1.11.2.min.js" />
		<script type="text/javascript" src="../../js/jquery/js/jquery-ui-1.11.3.custom.min.js" />
		<script type="text/javascript" src="../../js/jquery/js/jquery-ui-timepicker-addon.js" />
		<script type="text/javascript" src="../js/library.js" />
		<script type="text/javascript" src="../../js/jquery/js/jquery-ui-i18n.min.js" />
		<script type="text/javascript" src="../../js/jquery/js/jquery-ui-timepicker-addon-i18n.js" />		
        <script type="text/javascript" src="../../js/angular/angular.min.js" />
        <script type="text/javascript" src="../../js/angular/angular-animate.min.js" />
        <script type="text/javascript" src="../js/config.js" />
		<script type="text/javascript" src="../js/common.js" />
		<script type="text/javascript" src="../js/breadcrumb.js" />
		<script type='text/javascript' src='../../mod/jquery/mbMenu/inc/mbMenu.js'/>
		<script type="text/javascript" src="../js/banner.js" />
		<script type="text/javascript" src="../js/compareMaterials.js" />
		<script type="text/javascript" src="../js/materialsutil.js" />



	</h:head>
	<h:body class="Banner" onresize="setTreePnlHeight()"
		onload="loadApp();">
		<script type="text/javascript"
		src="../js/richfaces_backwardCompatability.js" />
		<script>
		$.noConflict();
		window.jQueryEnterprise=window.$;
		window.$=window.jQuery;
		
		</script>	
		<input type="hidden" id="smTreeScrollPos" value="0" />
		<input type="hidden" id="smTreeResizedWidth" value="0" />
		<input type="hidden" id="smWorkAreaScrollPos" value="0" />
		<sfw:include src="header.xhtml" />
        <div id="watermark" class="#{config.productionServer ? 'Hidden' : 'Watermark' }"></div>
		<rich:popupPanel style="display: none;">
						<rich:tabPanel id="tabPanelAux" switchType="client"
							rendered="false">
							<rich:tab name="DONT REMOVE">
                                  DUMMY TAB
                                 </rich:tab>
						</rich:tabPanel>
						<rich:tooltip id="dummyTooltip" styleClass="tooltip" layout="block">
                				<span></span>
            			</rich:tooltip>
						<rich:dropDownMenu mode="client">
							<rich:menuGroup>
								<rich:menuItem>
								</rich:menuItem>
							</rich:menuGroup>
							<rich:toolbar>
								<rich:toolbarGroup></rich:toolbarGroup>
							</rich:toolbar>
						</rich:dropDownMenu>
						<rich:inputNumberSpinner /> 
						<rich:orderingList  /> 
						<rich:message id="_msg" for="dummy"/>

					</rich:popupPanel>
		<a4j:outputPanel layout="block" styleClass="application" id="a">
				<script type="text/javascript">
				#{util.requestScopeScript}
				</script>
			<t:div id="csaeDiv" rendered="false" >
				<h:form id="csaeForm">
				</h:form>
				<script type="text/javascript">
				if(#{requestScope.csaeRender == 'true'})
					smCSAEWebstart("#{requestScope.csae_pid}","#{requestScope.csae_key}","#{requestScope.csae_url}");
				</script>				
			</t:div>
			<a4j:outputPanel layout="block" styleClass="application" id="dc"
				binding="#{res.panel}">
			<t:div id="div_csae" >
			</t:div>
			
				<h:form id="dlgform1">
				</h:form>
				<t:div id="dummyRefresh">
				</t:div>

				<!--  添加处理方法  -->
				<script type="text/javascript">
					 jQueryEnterprise("document").ready(function () {
						new DifferentclassificationTableFiexed().fixedRow();
					 });
				</script>

			

			</a4j:outputPanel>
			<rich:popupPanel id="globalerrors" height="100" width="250">
				<h:form id="glberr">
					<sfw:GraphicImage value="/themes/#{prefs.theme}/images/error.gif" />
					<h:outputText value="#{errHandlerBean.errorMsg}"></h:outputText>
					<p />
					<h:commandButton styleClass="Button" value="OK"
						actionListener="#{closeDlg.closeDialog}" />
				</h:form>
			</rich:popupPanel>
			<rich:popupPanel id="fuerrors" height="100" width="250">
				<h:form id="ff">
					<h:graphicImage value="/themes/#{prefs.theme}/images/error.gif" />
					<h:outputText value="#{i18n.prompt_error_uploadedFileSize}"></h:outputText>
					<p />
					<h:commandButton styleClass="Button" value="OK"
						actionListener="#{closeDlg.closeDialog}" />
				</h:form>
			</rich:popupPanel>
			<sfw:fileUploadErrors id="fue"></sfw:fileUploadErrors>
			<t:div>
				<h:form id="f" enctype="multipart/form-data"
					binding="#{prefs.appFormBinding}">
					
				
					<a4j:jsFunction name="loadApp" action="#{prefs.createApplication}">
						<a4j:param name="name" value="w" assignTo="#{prefs.name}" />
						<a4j:param name="type"
							value="com/msc/sdm/ui/widget/WorkspaceManager"
							assignTo="#{prefs.type}" />
					</a4j:jsFunction>


					<a4j:jsFunction name="triggerEvent"
						action="#{triggerEvent.process}">
						<a4j:param name="type" assignTo="#{triggerEvent.type}" />
						<a4j:param name="data" assignTo="#{triggerEvent.data}" />
					</a4j:jsFunction>
					<a4j:jsFunction name="easySearch" action="#{esb.processListener}" execute="@form" 
						oncomplete="Richfaces.hideModalPanel('SMSTATUSDLG-status');">
						<a4j:param name="widgetName" assignTo="#{esb.widgetName}" />
						<a4j:param name="eventType" assignTo="#{esb.eventType}" />
						<a4j:param name="eventData" assignTo="#{esb.eventData}" />

					</a4j:jsFunction>
					
					<a4j:jsFunction name="triggerSODEvent" action="#{triggerSODEvent.processListener}">
						<a4j:param name="widgetName" assignTo="#{triggerSODEvent.widgetName}" />
						<a4j:param name="handlerType" assignTo="#{triggerSODEvent.handlerType}" />
						<a4j:param name="eventData" assignTo="#{triggerSODEvent.eventData}" />
					</a4j:jsFunction>
					
				</h:form>


			</t:div>
				
			<h:form id="dlgform">
			</h:form>
			<t:div id="allForms">
				<h:form id="gs">
					<a4j:jsFunction name="lazyMenu" action="#{lomb.processListener}">
						<a4j:param name="widgetName" value="w"
							assignTo="#{lomb.widgetName}" />
						<a4j:param name="eventType" value="w" assignTo="#{lomb.eventType}" />
						<a4j:param name="eventData" value="w" assignTo="#{lomb.eventData}" />
					</a4j:jsFunction>
				</h:form>
				<h:form id="rr">
					<a4j:jsFunction name="terminate" action="#{tub.terminateUpload}">
						<a4j:param name="procID" assignTo="#{tub.procID}" />
					</a4j:jsFunction>
				</h:form>
				<h:form id="fff">
					<a4j:jsFunction name="call" action="#{gjb.dispAction}"
						binding="#{gjb.component}">
						<a4j:param name="widgetName" assignTo="#{gjb.widgetName}" />
						<a4j:param name="eventType" assignTo="#{gjb.eventType}" />
						<a4j:param name="eventData" assignTo="#{gjb.eventData}" />
					</a4j:jsFunction>
				</h:form>
			
			</t:div>
			<div id="smBusy" style="display:none" class="BusyModal">
                <img src="../../images/busy.gif"></img>
			</div>
			<rich:popupPanel resizeable="false" onresize="return false;"
                styleClass="status" id="SMSTATUSDLG-status" height="48" width="48"
                zindex="500">
                <h:graphicImage value="/themes/#{prefs.theme}/images/busy.gif" />
                <rich:componentControl target="SMSTATUSDLG-status" operation="hide"
                    event="beforeshow" />
            </rich:popupPanel>
			<div class="StatusMessage">
				<a4j:status id="ajxStatus" onstart="smShowBusy(); return false;" onstop="smHideBusy(); return false;">
					
				</a4j:status>
			</div>
			
		</a4j:outputPanel>
        <div class="SmFooter">
            <table><tr>
                <td><h:outputText value="#{config.portalName} (#{config.version})" /></td>
                <td><h:graphicImage value="/images/blank.gif" width="20" height="1"/></td>
                <td><h:graphicImage value="/icon/default/16/user.png" title="User"/></td>
                <td><h:outputText value="#{user.name} (#{user.profile})" /></td>
                <td width="99%"></td>
                <td class="#{config.materialCenter ? '' : 'Hidden' }"><h:graphicImage value="/icon/default/16/filter.png" title="Global Filter"/></td>
                <td class="#{config.materialCenter ? '' : 'Hidden' }"><span style="cursor:pointer" onclick="javascript:editGlobalQuery()"><h:outputText value="#{i18n.title_gq}" /> <span title="#{prefs.globalQuery}"><h:outputText value="#{prefs.shortGlobalQuery}" /></span></span></td>
                <td class="#{config.materialCenter ? '' : 'Hidden' }"><h:graphicImage value="/images/blank.gif" width="20" height="1"/></td>
                <td><h:graphicImage value="/icon/default/16/units.png" title="Units System"/></td>
                <td class="SmRight"><span style="cursor:pointer" id="footer_Units" menu="unitsMenu" ><h:outputText id="smfooter" value="#{i18n.prompt_current_unitsSystem} (#{prefs.unitSystem})  " /></span><br/></td>
                <td ng-app="ULM" ng-controller="UlmCtrl" ng-cloak="ng-cloak" class="SmRight">
                    <div ng-if="data.files.length > 0" ng-click="ui.showFiles = true" style="cursor: pointer;">
                        {{data.files.length}}
                        <img src="../../icon/default/16/ulm.gif"></img>
                        <span ng-hide="ui.rem == 0">{{ui.rem}}</span>
                    </div>
                    <div ng-show="ui.showFiles" class="BfsModal"
                         style="color: #000; text-align: left;"
                         ng-include="'../../pip/bfs/ulm2.html'"></div>
                </td>
            </tr></table>
        </div>
 	
	<script type="text/javascript" src="../js/tableSelection.js" />
	<script type="text/javascript" src="../js/recentObjectsSelection.js"></script>
	<script type="text/javascript" src="../../js/json.js"></script>
	<script type="text/javascript" src="../js/jsonrpc.js"></script>
	<script type="text/javascript">mxBasePath = '../../js/mxGraph';</script>
	<script type="text/javascript" src="../../js/mxGraph/js/mxClient.js"></script>
	<script type="text/javascript" src="../../js/sdmGraph.js"></script>
	<script type="text/javascript" src="../js/reportwizard.js"></script>
	<script type="text/javascript" src="../js/clienttree.js" />
	<script type="text/javascript" src="../js/scroll.js" />
	<script type="text/javascript" src="../js/library.js" />
	<script type="text/javascript" src="../../facelets/main/js/CSTabbedListEditorWidget.js"></script>
	
	<script type="text/javascript" src="../../mod/jquery/slimbox1/js/slimbox2.js" />
    <script type="text/javascript" src="../../js/highlight/highlight.js" />
    
	<script type="text/javascript" src="../../mod/mod.js" />
	<script type="text/javascript" src="../../tree/tree.js"/>
	<script type="text/javascript" src="../../tree/jquery.treetable.js" />
	<script type="text/javascript" src="../js/matrixUtils.js" />
	<script type="text/javascript" src="../../sws/sws.js" />
	<script type="text/javascript" src="../../sod/sod.js" />
    <script type="text/javascript" src="../../js/car.js" />
    <script type="text/javascript" src="../../js/angular/i18n.js" />
    
    <script type="text/javascript" src="../../js/angular/bfs.js" />
    
    <script type="text/javascript" src="../../js/angular/ulm2.js" />
	<script type="text/javascript" src="../../colorpicker/js/colpick.js" />
	<script type="text/javascript" src="../../searchtemplate/search.js" />
	<script type="text/javascript" src="../../home/hometab.js" />
	<script type="text/javascript" src="../../js/custom.js"></script>
	
	<!--[if lt IE 6.]>
	  <script type="text/javascript" src="../js/unitpngfix.js"/>
	  <![endif]-->
      
	<script>
    	window.onbeforeunload = function(e) { return 'There may be pending file uploads!'; };
        function smShowBusy() { APP.showBusy(); }
        function smHideBusy() { APP.hideBusy(); }
        jQueryEnterprise(function(){
    		var jUnits = jQueryEnterprise('#footer_Units');
    		var unitsImage = "../../mod/jquery/mbMenu/ico/";
    	    jUnits.buildMenu({
    	        rpc: createUnitsMenu,
    	        menuWidth:200,
    	        openOnRight:false,
    	        menuSelector: ".menuContainer",
    	        menuStyle : "border-width:1px;",
    	        hasImages:true,
    	        iconPath : unitsImage,
    	        isAnchorTag : true,
    	        isEasySearch : true,
    	        adjustLeft:2,
    	        menuTop:-142,
    	        hoverIntent:0,
    	        openOnClick:true,
    	        submenuHoverIntent:200
    	    });
    	});
    	
    	jsf.ajax.addOnEvent(function(data){
    		if (data.status == "success")
    				initJQuery();

    			
    		});
		var smPageScroll = false;
		// Avoid jquery dialogs following scrolls
    	window.onscroll = function(){
    		if(smPageScroll)
    			return true;
    		smPageScroll = true;
    		var dialogs = jQueryEnterprise(".ui-dialog");
    		dialogs.css({'position':'fixed' });
    		setTimeout(function() {
        	    if(smPageScroll) {
        	    	smPageScroll = false;
        	    }
        	}, 100);
    		
    	}	
    	window.onresize = function(event) {
    		resizeAOS();
    		window.setTimeout(APP.resizeActiveClientDialog(),1000);    		
    	}
    		document.onkeyup = function(e) {
    			if (!e)
    				var e = window.event;
    			var code = e.keyCode ? e.keyCode : e.which;
    			if (code == 27) {
    				var cmenu = jQueryEnterprise("#mb_ctx");
    				var menu = jQueryEnterprise("div[id^='mb_']");
    				var subMenu = jQueryEnterprise("div[id^='mb_sub_']");
    				if (menu.length > 0)
    					menu.hide();
    				if (cmenu.length > 0) {
    					cmenu.hide();
    					if (subMenu.length > 0)
    						subMenu.hide();
    				}
    				Richfaces.hideModalPanel('SMSTATUSDLG-status');
    				e.returnValue = false;

    			}
    		};
    		
    		document.onkeypress = function(e) {
    			if (!e)
                    var e = window.event;
    			var target = e.target;
                if(target.tagName === 'TEXTAREA')return;
                var code = e.keyCode ? e.keyCode : e.which;
                if(code == 13){
                	e.preventDefault();
                	return false;
                }
    		};
	</script>
  </h:body>
</f:view>
